<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default filesystem disk that should be used
    | by the framework. The "local" disk, as well as a variety of cloud
    | based disks are available to your application. Just store away!
    |
     */

    'default' => env('FILESYSTEM_DRIVER', 'local'),

    /*
    |--------------------------------------------------------------------------
    | Default Cloud Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Many applications store files both locally and in the cloud. For this
    | reason, you may specify a default "cloud" driver here. This driver
    | will be bound as the Cloud disk implementation in the container.
    |
     */

    'cloud'   => env('FILESYSTEM_CLOUD', 's3'),

    /*
    |--------------------------------------------------------------------------
    | Filesystem Disks
    |--------------------------------------------------------------------------
    |
    | Here you may configure as many filesystem "disks" as you wish, and you
    | may even configure multiple disks of the same driver. Defaults have
    | been setup for each driver as an example of the required options.
    |
    | Supported Drivers: "local", "ftp", "s3", "rackspace"
    |
     */

    'disks'   => [

        'local'                  => [
            'driver' => 'local',
            'root'   => storage_path('app'),
        ],

        'public'                 => [
            'driver'     => 'local',
            'root'       => storage_path('app/public'),
            'url'        => env('APP_URL') . '/storage',
            'visibility' => 'public',
        ],

        's3'                     => [
            'driver' => 's3',
            'key'    => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
        ],
        // 使用自带的ftp
        'ftp'                    => [
            // 'driver'   => 'ftp',
            // 'host'     => 'ftp.example.com',
            // 'username' => 'your-username',
            // 'password' => 'your-password',

            'driver'   => 'ftp',
            // 'host'   => '125.62.26.96', // 10.69.42.148|192.168.1.4
            // 'port'  => 61922,
            // 'username' => 'ftptest', // web1|tian
            // 'password'   => '12345678', // 123456|tian
            'host'     => '127.0.0.1', // 10.69.42.148|192.168.1.4
            'port'     => 21,
            'username' => 'hunter', // web1|tian
            'password' => 'hunter', // 123456|tian
            'passive'  => true,
            // 主动FTP对FTP服务器的管理有利，但对客户端的管理不利。因为FTP服务器企图与客户端的高位随机端口建立连接，而这个端口很有可能被客户端的防火墙阻塞掉。被动FTP对FTP客户端的管理有利，但对服务器端的管理不利。因为客户端要与服务器端建立两个连接，其中一个连到一个高位随机端口，而这个端口很有可能被服务器端的防火墙阻塞掉。
            'root'     => '', // /home/www|空
            'upload'   => 'upload',

            // Optional FTP Settings...
            // 'port'     => 21,
            // 'root'     => '',
            // 'passive'  => true,
            // 'ssl'      => true,
            // 'timeout'  => 30,
        ],

        // 注入回调
        'injection_callback_ftp' => [
            'driver'   => 'ftp',
            'host'     => '10.43.36.5',
            'port'     => 21,
            'username' => 'result',
            'password' => '123456',
            'passive'  => true,
            // 主动FTP对FTP服务器的管理有利，但对客户端的管理不利。因为FTP服务器企图与客户端的高位随机端口建立连接，而这个端口很有可能被客户端的防火墙阻塞掉。被动FTP对FTP客户端的管理有利，但对服务器端的管理不利。因为客户端要与服务器端建立两个连接，其中一个连到一个高位随机端口，而这个端口很有可能被服务器端的防火墙阻塞掉。
            'root'     => '',
            'upload'   => '',
        ],
        // 注入
        'injection_ftp'          => [
            'driver'   => 'ftp',
            // 'host'   => '125.62.26.96', // 10.69.42.148|192.168.1.4
            // 'port'  => 61922,
            // 'username' => 'ftptest', // web1|tian
            // 'password'   => '12345678', // 123456|tian
            'host'     => '10.43.36.5', // 10.69.42.148|192.168.1.4
            'port'     => 21,
            'username' => 'handongty', // web1|tian
            'password' => 'handong567894', // 123456|tian
            'passive'  => true,
            // 主动FTP对FTP服务器的管理有利，但对客户端的管理不利。因为FTP服务器企图与客户端的高位随机端口建立连接，而这个端口很有可能被客户端的防火墙阻塞掉。被动FTP对FTP客户端的管理有利，但对服务器端的管理不利。因为客户端要与服务器端建立两个连接，其中一个连到一个高位随机端口，而这个端口很有可能被服务器端的防火墙阻塞掉。
            'root'     => '', // /home/www|空
            'upload'   => '',

        ],

        // 添加 `自定义` 上传文件目录, 比如: 导入媒资的excel文件的存放目录
        'custom'                 => [
            'driver'     => 'local',
            'root'       => public_path('upload'),
            'visibility' => 'public',
        ],

        // 添加 `laravl-admin` 上传文件目录
        'admin'                  => [
            'driver'     => 'local',
            'root'       => public_path('upload/image'),
            'url'        => config('admin.upload.host'),
            'visibility' => 'public',
        ],

        // 添加 `七牛云` disk
        'qiniu'                  => [
            'driver'     => 'qiniu',
            'domains'    => [
                'default' => 'otf63oz0v.bkt.clouddn.com', //你的七牛域名
                'https'   => '', //你的HTTPS域名
                'custom'  => '', //你的自定义域名
            ],
            'access_key' => '', //AccessKey
            'secret_key' => '', //SecretKey
            'bucket'     => '', //Bucket名字
            'notify_url' => '', //持久化处理回调地址
            'access'     => 'public', //空间访问控制 public 或 private
        ],

        // 添加 `laravel-backup` 备份文件目录
        'laravel-backup'         => [
            'driver'     => 'local',
            'root'       => storage_path(env('BACKUP_PATH')),
            'visibility' => 'public',
        ],
        // 添加`模板.zip` 上传文件目录
        'template'               => [
            'driver'     => 'local',
            'root'       => public_path('upload/compress_upload/'),
            'visibility' => 'public',
        ],

    ],

];
